import React,{Component} from 'react';
import './SearchPage.css'
import {withRouter} from 'react-router-dom';



class SearchPage extends Component{
    constructor(){
        super();
    }
    goBack(){
        this.props.history.goBack();
    }
    toSearchList(){
        this.props.history.push({pathname:"/SearchList"});
    }
    render(){
        return(
            <div className="SearchPage">
                <div className="Header">
                    <div className="HeaderLeft">
                        <i className="fa fa-angle-left" onClick={this.goBack.bind(this)}></i>
                    </div>
                    <div className="HeaderCenter">
                        <div className="HeaderCenter_input">
                            <i className="fa fa-search"></i>
                            <input type="text" placeholder="搜索伊的家商品"/>
                        </div>
                    </div>
                    <div className="HeaderRight">
                        <span onClick={this.toSearchList.bind(this)}>搜索</span>
                    </div>
                </div>
                <div className="container">
                    <p>搜索历史</p>
                    <span>搜索历史为空</span>
                    <p>热门搜索</p>
                    <div>
                        <a href="#"> 面膜 </a>
                        <a href="#"> 雪嫩 </a>
                        <a href="#"> 蚕丝面膜 </a>
                        <a href="#"> 肌底 </a>
                        <a href="#"> 隔离 </a>
                        <a href="#"> 时间轴 </a>
                        <a href="#"> 水分源 </a>
                        <a href="#"> 防晒 </a>
                        <a href="#"> 洁面乳 </a>
                        <a href="#"> 精华 </a>
                    </div>
                </div>
            </div>
        )
    }
}



export default withRouter(SearchPage);